Necessary change to make ia64 dom0 rework:
authordjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Mon, 24 Oct 2005 15:15:53 +0000 (09:15 -0600)
committerdjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Mon, 24 Oct 2005 15:15:53 +0000 (09:15 -0600)
- All even channels on xen/ia64 shares one common interrupt vector
- xen_start_info is initialized only after xen_init, so adjust
  sequence to avoid access before initialization

Signed-off-by Kevin Tian <kevin.tian@intel.com>

linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c
linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c

index 0027b82a6243416d1fad3edb7e8ea2a4419800db..ac8ff9ec4cec141daae3d2a80ddea9957d343e4c 100644 (file)
@@ -29,7 +29,7 @@ unsigned int bind_virq_to_evtchn(int virq)
     return op.u.bind_virq.port;
 }
 
-int bind_virq_to_irq(int virq)
+int bind_virq_to_irq(int virq, int cpu)
 {
        printk("bind_virq_to_irq called... FIXME??\n");
        while(1);
@@ -66,7 +66,11 @@ int bind_evtchn_to_irqhandler(unsigned int evtchn,
     evtchns[evtchn].handler = handler;
     evtchns[evtchn].dev_id = dev_id;
     unmask_evtchn(evtchn);
-    return 0;
+    //return 0;
+    /* On ia64, there's only one irq vector allocated for all event channels,
+     * so let's just return evtchn as handle for later communication
+     */
+    return evtchn;
 }
 
 void unbind_evtchn_from_irqhandler(unsigned int evtchn, void *dev_id)
index b13f22a771594c59708aa44dffc3896244c64127..db954ca76856f0c282e44596827e3276e3745c95 100644 (file)
@@ -25,8 +25,8 @@
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
 #include <asm/tlb.h>
-#include <asm-xen/linux-public/privcmd.h>
 #include <asm/hypervisor.h>
+#include <asm-xen/linux-public/privcmd.h>
 #include <asm-xen/xen-public/xen.h>
 #include <asm-xen/xen-public/dom0_ops.h>
 #include <asm-xen/xen_proc.h>
index e5c9de11397f1c368f9c11ba5cd1c89ea0732a76..74d42f6d8df478165582453263d4ff676876b9dd 100644 (file)
@@ -714,11 +714,7 @@ static int xsd_port_read(char *page, char **start, off_t off,
 
 static int __init xenbus_probe_init(void)
 {
-       int err = 0;
-       /* 
-       ** Domain0 doesn't have a store_evtchn or store_mfn yet. 
-       */
-       int dom0 = (xen_start_info->store_evtchn == 0);
+       int err = 0, dom0;
 
        printk("xenbus_probe_init\n");
 
@@ -733,6 +729,11 @@ static int __init xenbus_probe_init(void)
        device_register(&xenbus_frontend.dev);
        device_register(&xenbus_backend.dev);
 
+       /*
+       ** Domain0 doesn't have a store_evtchn or store_mfn yet.
+       */
+       dom0 = (xen_start_info->store_evtchn == 0);
+
        if (dom0) {
 
                unsigned long page;